﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hartley.BusinessLogic;
using Hartley.DTOs;
using Hartley.Entities;

namespace Hartley.ApplicationLogic
{
   public class AdminAL
    {
        HcFacade hcFacade = new HcFacade();

        public void saveNews(NewsItemDTO newsItemDTO)
        {
            hcFacade.SaveNews(newsItemDTO);
        }


        public string saveStaff(StaffDTO staffDTO)
        {
            try
            {
                return hcFacade.saveStaff(staffDTO);
            }
            catch
            {
                throw;
            }
        }





        public List<NewsItemDTO> GetNewsById(Guid newsId)
        {
            return hcFacade.GetNewsbyId(newsId);
        }





        public List<NewsItemDTO> GetAllNews()
        {
            return hcFacade.GetAllNews();
        }

        public List<StaffDTO> GetAllStaff()
        {
            return hcFacade.GetAllStaff();
        }

        public List<StaffDTO> GetStaffById(Guid staffId)
        {
            return hcFacade.GetStaffById(staffId);
        }
    }
}
